package com.wmyg.scanninggun.service.impl;

import com.wmyg.scanninggun.bean.User;
import com.wmyg.scanninggun.dao.UserMapper;
import com.wmyg.scanninggun.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void delete(int id) {

    }

    @Override
    public void insert(User user) {

        userMapper.insert(user);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public User selectById(int userId) {
        return null;
    }

    @Override
    public List<User> selectByUserName(String userName) {

        return userMapper.findByUserName(userName);
    }

    @Override
    public User findUserByNameAndPwd(String userName,String password) {
        return userMapper.findUserByNameAndPwd(userName,password);
    }

    @Override
    public List<User> selectAll(int pageNum, int pageSize) {
        return null;
    }
}
